# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Can Celasun <can[at]dcc[dot]im>

pkgname=netsniff-ng
pkgver=0.6.8
pkgrel=4
pkgdesc='High performance Linux network sniffer for packet inspection'
arch=('loong64' 'x86_64')
url='http://netsniff-ng.org/'
license=('GPL2')
depends=('glibc' 'ncurses' 'libncursesw.so' 'geoip' 'zlib' 'libnetfilter_conntrack'
         'libpcap' 'libpcap.so' 'liburcu' 'libnl' 'libcli' 'libcli.so' 'libnet' 'libsodium')
makedepends=('cmake' 'flex' 'bison')
source=(http://pub.netsniff-ng.org/netsniff-ng/netsniff-ng-${pkgver}.tar.gz{,.sign})
sha512sums=('0168684ee912d784af6659bb6c9459ef69a0d3af9fc754c3c57e3533790a912cf556aab6752cda5e0cbf6ee57987d8dbc0fc800dfd9e269c922e8ae43f61491f'
            'SKIP')
validpgpkeys=('C3DE742283C246F2D7887AB4236B0FE9B5510F47')  # Tobias Klauser <tklauser@distanz.ch>

build() {
  cd ${pkgname}-${pkgver}
  NACL_INC_DIR=/usr/include/sodium
  NACL_LIB=sodium
  ./configure \
    --prefix=/usr
  make all Q= CFLAGS="${CFLAGS} ${CPPFLAGS}"
}

package() {
  cd ${pkgname}-${pkgver}
  make PREFIX=/usr DESTDIR="${pkgdir}" SBINDIR=/usr/bin install_all
}

# vim: ts=2 sw=2 et:
